package com.qding.park.manager.pojo.enums;

/**
 * @author Administrator
 *订单来源
 */
public enum OrderSourceEnum {
	OUTLINE(-1,	"现场"),
	APP(0,"app"),
	CUSTOMER(1,"代客下单"),
	WX(2,"公众号");
	
	private int type;
	
	private String desc;
	
	
	public static String getDescByCode(int type){
		String temp="";
		if(type==OUTLINE.getType()){
			temp=OUTLINE.getDesc();
		}else if(type==APP.getType()){
			temp=APP.getDesc();
		}else if(type==CUSTOMER.getType()){
			temp=CUSTOMER.getDesc();
		}else if(type==WX.getType()){
			temp=WX.getDesc();
		}else{
			temp="";
		}
		
		return temp;
	}
	private OrderSourceEnum(int type,String desc){
		this.type=type;
		this.desc=desc;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
